1. Field of Invention
The present invention generally relates to systems that measure or predict latency within data networks.
2. Description of the Related Art
Many different applications require communications networks with low or predictable latency. In particular, High Frequency Trading requires minimized network latency to ensure quick trading between exchanges or other execution venues. Current methods to minimize or predict network latency are complex, error prone, or are unsuitable for larger networks. It is therefore necessary to measure or predict the network latency that the market data incurs as it flows across multiple networks on a “hop” by “hop” basis in a simple, accurate, and large-scale way.
One such current method is to inject a packet at the receiving location and ‘ping’ the various routers or network devices that traffic is flowing over. Measuring the time taken for a ping to be returned to the device originating the ‘ping’ allows computation of the round trip latency. However, while this technique is useful for measuring round trip latency, it is unsuitable for measuring one-way latency. This is because, in many environments, and particularly in those involving market data traffic, the traffic volumes are significantly asymmetrical—the traffic on the sending path is significantly greater than the traffic on the return path. Thus the one-way traffic measurements estimated from round-trip measurements do not represent the latency of actual one-way traffic flow. In addition, the ‘test’ measurement packet used to generate the ‘ping’ will often produce more errors, either because it causes extra traffic or its size or priority is not the same as real traffic. Accordingly, there is a need for an accurate way to measure data networks' one-way latency.
Another method is to passively ‘tap’ the traffic flows along the data path by using devices called ‘probes’ and append a time stamp to the captured data using an accurate synchronized clock source derived from a GPS signal or an Atomic clock and using timing protocols such as NTP and PPS, or IEEE 1588 (Precision Time Protocol—also known as PTP) or IRIG-B. If the captured packet has some form of unique identifier it is possible to send the captured data to a central source or to another capture device where data from two separate taps can be analyzed and compared to derive one way latencies between the two points. The key disadvantage of this approach is that it generates large amounts of network traffic as details of each packet (its unique identifier and time stamp) are sent between probes or to a central device. The approach may be feasible for measuring latencies between specific points in a given location—e.g. data center—but is less feasible when large amounts of data have to be sent over wide area networks. Accordingly, there is a need for a way to measure latency over large-scale networks.
Another method is to insert a timestamp into the packet of the originating data stream and measure when that arrives at a given point. The latency can be measured by using either a passive ‘tap’ or if the latency from the originating to the destination point is required this can be calculated by extracting the time stamp in the destination hardware associated with the end application. As long as the same time stamp is being used at the origination and receiving locations it is possible to compute the end to the end latency by comparing the time of arrival of the packet with the timestamp embedded within it. The disadvantage of this approach is that it relies on the injection of time stamps into the data flow that would otherwise not be there. This increases the bandwidth used on the link and adds complexity at the transmitting location. Accordingly, there is a need to simply measure network latency without consuming large amounts of bandwidth.